package com.company.nuwa.common.enumration;

import lombok.AllArgsConstructor;
import lombok.Getter;

/**
 * <p>message status</p >
 *
 * @author Mitchell
 * @version 1.0
 * @date 2020/06/01 14:42
 */
@AllArgsConstructor
public enum MessageStatus {

    /**
     * commit
     */
    COMMIT(1, "commit", MessageHandlerFlag.NO_NEED),

    /**
     * unknown
     */
    UNKNOWN(2, "unknown", MessageHandlerFlag.NO_NEED),

    /**
     * rollback
     */
    ROLLBACK(3, "rollback", MessageHandlerFlag.WAIT_HANDLER),

    ;

    @Getter
    private int code;

    @Getter
    private String message;

    @Getter
    private MessageHandlerFlag flag;
}
